package us.cirion.adventure.engine.result;

import us.cirion.adventure.engine.GameDisplay;
import us.cirion.adventure.engine.Result;

/**
 * NewGame orders the user interface to return the user to a new game. Depending
 * on the interface, this may mean a simple restart of the game, or it may
 * return the user to a main menu or other screen. New games can happen as the
 * result of a player command, but could also occur at other points in the game.
 * 
 * @author Chris
 */
public class NewGame implements Result
{

	private GameDisplay gameDisplay;

	/**
	 * Constructs a new game command.
	 * 
	 * @param game The user interface responsible for executing the new game
	 *            command.
	 */
	public NewGame(GameDisplay game)
	{
		this.gameDisplay = game;
	}

	/**
	 * Starts a new game.
	 */
	public void execute()
	{
		gameDisplay.newGame();
	}

}
